package com.ghck.server.model.response;

import java.util.Map;

import org.apache.commons.lang3.StringUtils;

import com.ghck.server.model.PatientEventDay;
import com.ghck.server.model.Users;
import com.ghck.server.utils.FileStoreUtil;

public class UserRes extends Users{


	private static final long serialVersionUID = 1L;
	
	/**
	 * 家庭阳光值
	 */
	private Integer creditsAmount;
	private String accessId;
	
	/**
	 * 健康评分
	 */
	private Integer questionScore;
	
	private Map<String, PatientEventDay> lastPatientEvent;
	
	public Integer getCreditsAmount() {
		return creditsAmount;
	}

	public void setCreditsAmount(Integer creditsAmount) {
		this.creditsAmount = creditsAmount;
	}

	public Integer getQuestionScore() {
		return questionScore;
	}

	public void setQuestionScore(Integer questionScore) {
		this.questionScore = questionScore;
	}

	
	public Map<String, PatientEventDay> getLastPatientEvent() {
		return lastPatientEvent;
	}

	public void setLastPatientEvent(Map<String, PatientEventDay> lastPatientEvent) {
		this.lastPatientEvent = lastPatientEvent;
	}

	@Override
	public void dealWith() {
		super.dealWith();
		if(!StringUtils.isEmpty(getAvatar()) && StringUtils.startsWithIgnoreCase(getAvatar(), "http")){
			setAvatar(FileStoreUtil.getBaseUrl()+getAvatar());
		}
	}

	public String getAccessId() {
		return accessId;
	}

	public void setAccessId(String accessId) {
		this.accessId = accessId;
	}

}
